<template>
	<!-- <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y"> -->
	<view class="scroll-Y">
		<view v-if="teacherData.length!==0">
			<view v-for="(item,index) in teacherData" class="teacher-item-box" @click="teacherDetailsTo(item)">
				<image :src=" 'https://educationafter.jinghaischool.com' + item.educPhoto" class="teacher-item-img">
				</image>
				<view class="item-text-box">
					<!-- 名称 性别 ID 状态 -->
					<view class="item-name-sex-id-state-box">
						<view class="item-name-sex-id-size">
							<text>{{item.educName}} </text>
							<text>( {{item.educSex == 0 ?'男':'女'}} ID:{{item.educId}} )</text>
						</view>
						<text v-if="item.educType==0" class="item-state-txt">在校大学生</text>
						<text v-if="item.educType==1" class="item-state-txt">在校研究生</text>
						<text v-if="item.educType==2" class="item-state-txt">专业教师</text>
						<text v-if="item.educType==3" class="item-state-txt">其他</text>
					</view>
					<!-- 学校 专业 学历 -->
					<view class="school-speciality-education-box">
						<text class="jh-m-r-10">{{item.teacherTeachingDtos[0].teacherTeachingLable}} </text>
						<text class="jh-m-r-10">| {{item.educSpeciality}} </text>
						<text>| {{item.educEducation}} </text>
					</view>
					<!-- 任教科目 -->
					<view class="subject-txt">
						<text v-for="(el,index) in item.teacherChingDtos">
							<text v-if="index != 0">|</text>{{el.fName}}{{el.zName}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="" v-else>
			<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" width="750rpx" height="750rpx">
			</u-empty>
		</view>
	</view>
	<!-- </scroll-view> -->
</template>

<script>
	export default {
		props: {
			teacherData: {
				type: Array,
				default: () => [],
				required: true,
			},
		},
		data() {
			return {}
		},
		methods: {
			teacherDetailsTo(item) {
				this.$emit('clickItem', item)
			}
		}

	}
</script>

<style scoped>
	.subject-txt {
		white-space: nowrap;
		/* 不换行 */
		overflow: hidden;
		/* 隐藏内容 */
		text-overflow: ellipsis;
		/* 显示省略号 */
	}

	.school-speciality-education-box {
		width: 100%;
		white-space: nowrap;
		/* 不换行 */
		overflow: hidden;
		/* 隐藏内容 */
		text-overflow: ellipsis;
		/* 显示省略号 */
	}

	.item-state-txt {
		color: #ff9600;
	}

	.item-name-sex-id-size {
		font-weight: 600;
		font-size: 30rpx;
	}

	.item-name-sex-id-state-box {
		width: 100%;
		height: 30rpx;
		display: flex;
		justify-content: space-between;
	}

	.item-text-box {
		width: 533rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		padding: 0 0 0 15rpx;
	}

	.teacher-item-img {
		width: 160rpx;
		height: 160rpx;
		border-radius: 7rpx;
	}

	.teacher-item-box {
		font-size: 29rpx;
		width: 100%;
		height: 160rpx;
		margin-bottom: 40rpx;
		display: flex;
		background-color: white;
	}

	.scroll-Y {
		width: 100%;
		margin: auto;
	}
</style>